package com.xyx.ssm.jdbcdao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xyx.ssm.po.WineFactory;


@Repository
public class WinefactoryDao extends BaseDao {

	 public int winefactoryadd(WineFactory wineFactory) {

		int num = sqlSession.insert(
				"com.xyx.ssm.jdbcdao.winefactoryDao.winefactoryadd", wineFactory);

		return num;
	}

	public int winefactoryDelete(Integer ids) {
		int num = sqlSession.delete(
				"com.xyx.ssm.jdbcdao.winefactoryDao.winefactorydelect", ids);

		return num;

	}
	
	public int winfactoryUpdate(WineFactory wineFactory){
		int num=sqlSession.update("com.xyx.ssm.jdbcdao.winefactoryDao.winefactoryupdata", wineFactory);
		return num;
		
	}
	
	public List<WineFactory> winfactoryId(Integer id){
		List<WineFactory> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.winefactoryDao.winefactoryid", id);
		return list;
		
	}
}